package com.yilin.platform.mapper.user;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yilin.platform.base_core.application.PageData;
import com.yilin.platform.entity.user.Account;
import com.yilin.platform.entity.user.Organize;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

/**
 * @author liuxu :)
 * @version 1.0
 * @date 2022-10-24 0024
 */
@Mapper
@Repository
public interface OrganizeMapper extends BaseMapper<Organize> {

    /**
     * 获取货源列表
     * 排序时sort!=null，筛选时query!=null，按离我最近排序时position!=null
     */
    PageData<Organize> getBelowOrganizePage(@Param("page") PageData<Organize> page, @Param("query") Organize query);
    //合作区
    PageData<Organize> getCooperateTruckerPage(@Param("loginUser") Account loginUser, @Param("query") Organize query, PageData<Organize> page);
    PageData<Organize> getCooperateShipperPage(@Param("loginUser")Account loginUser,@Param("query") Organize query, PageData<Organize> page);

    //预定可合作区
    PageData<Organize> getPlatTruckerPage(@Param("loginUser")Account loginUser,@Param("query") Organize query, PageData<Organize> page);
    PageData<Organize> getPlatShipperPage(@Param("loginUser")Account loginUser,@Param("query") Organize query, PageData<Organize> page);
}
